<div class="section_title">Poll</div>
{assign var="latestpoll" value=$core->database->latest_poll()}
{assign var="poll" value=$core->database->get_poll($latestpoll.pollid)}
{if !$poll}
No active poll {if $core->session->isLoggedIn() == 1}{if $smarty.session.userlevel >= $smarty.const.USER_MODERATOR}- <a href="./?n=polls/create">Create Poll</a>{/if}{/if}
{else}
{$latestpoll.question}<br />
<form name="frmpoll" action="./?n=polls/results&vote=1" method="post">
{section name=poll loop=$poll}<input type="radio" name="vote" value="{$poll[poll].choice}">{$poll[poll].activity}<br />
{/section}
<input type="submit" name="Submit" value="Vote" />
</form><br />
<a href="./?n=polls/results">Show Results</a>
{/if}